﻿<ContentControl x:Class="Microsoft.Research.DynamicDataDisplay.Legend"
								xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
								xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
								xmlns:l="clr-namespace:Microsoft.Research.DynamicDataDisplay"
								Visibility="Hidden"
                                Panel.ZIndex="100"
								>
    <Canvas>
        <Grid Canvas.Top="{Binding Path=LegendTop, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type l:Legend}}}" 
              Canvas.Bottom="{Binding Path=LegendBottom, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type l:Legend}}}"
              Canvas.Left="{Binding Path=LegendLeft, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type l:Legend}}}"
              Canvas.Right="{Binding Path=LegendRight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type l:Legend}}}"
              >
            <Rectangle RadiusX="5" RadiusY="5" Stroke="Black" StrokeThickness="1" Fill="White">
                <Rectangle.Effect>
                    <DropShadowEffect Direction="300" ShadowDepth="3" Opacity="0.4"/>
                </Rectangle.Effect>
            </Rectangle>
            <StackPanel x:Name="stackPanel" Margin="3"/>
        </Grid>
    </Canvas>
</ContentControl>
